<template>
  <dv-active-ring-chart :config="config" style="width:300px;height:400px" />
</template>

<script>
    import * as category from "src/api/category";

    export default {
        name: "pie",
        data(){
          return {
            config: {
              radius: '70%',
              activeRadius: '45%',
              showOriginValue: true,
              data: []
            }
          }
        },
      methods: {
        async initData(){
          const that = this
          await  category.countCategoryGood().then(function (response) {
            let data  = response.data.data
            console.log(data)
            that.config = {
              data: data,
              radius: '70%',
              activeRadius: '45%',
              showOriginValue: true,
            }
          })
        }
      },
      created() {
        this.initData()
      }
    }
</script>

<style scoped>

</style>
